package com.ylr.storage.framework.manager;

import com.ylr.storage.framework.service.StorageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-09-08 15:37:13
 * className: StorageManager
 * version: 1.0
 * description:
 */
@Component
public class StorageManager {

    private static final Logger log = LoggerFactory.getLogger(StorageManager.class);

    private static final Map<Integer, StorageService> storageServiceMap = new HashMap<>();

    /**
     * 注册存储服务实现类
     * @param channel    存储渠道
     * @param smsService 存储服务对象
     */
    public static void register(Integer channel, StorageService smsService) {
        storageServiceMap.put(channel, smsService);
    }
}
